package com.psa.tool;

import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.widget.RemoteViews;
import com.psa.system.MainActivity;

/**
 * Created by david on 2014-07-25.
 */
public class NotificationTool {
    public static void showNotification(int id, int icon, String title, String msg, Context context, Intent intent){
//        Notification n = new NotificationCompat.Builder(context).setSmallIcon(icon)
//                .setTicker(title)
//                .setContentTitle(title)
//                .setContentText(msg)
//                .setAutoCancel(true).setDefaults(Notification.DEFAULT_ALL)
//                .build();
//        if (intent!=null) {
//            n.contentIntent = PendingIntent.getActivity(context, id, intent, PendingIntent.FLAG_UPDATE_CURRENT);
//        }
////        Notification notification=new Notification(icon, title, System.currentTimeMillis());
////
////        notification.flags = Notification.FLAG_AUTO_CANCEL;
////        Intent i = new Intent(context, cls);
//////        i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
////        PendingIntent contentIntent = PendingIntent.getActivity(
////                context, id, i, PendingIntent.FLAG_UPDATE_CURRENT);
////
////        notification.setLatestEventInfo(
////                context,
////                title,
////                msg,
////                contentIntent);
//        SystemStatus.notificationManager.notify(id, n);

    }
}
